home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Toolbox / OtherResInfo-MungeDeamon / OtherResInfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-22  |  3.1 KB  |  103 lines  |  [TEXT/MPS ]

  1. #ifndef __ORIDEFINES__
  2. #define __ORIDEFINES__
  3. #include <Types.h>
  4. #include <memory.h>
  5. #include <Packages.h>
  6. #include <Errors.h>
  7. #include <quickdraw.h>
  8. #include <fonts.h>
  9. #include <dialogs.h>
  10. #include <windows.h>
  11. #include <menus.h>
  12. #include <events.h>
  13. #include <OSEvents.h>
  14. #include <Desk.h>
  15. #include <diskinit.h>
  16. #include <OSUtils.h>
  17. #include <resources.h>
  18. #include <toolutils.h>
  19. #include <AppleEvents.h>
  20. #include <EPPC.h>
  21. #include <GestaltEqu.h>
  22. #include <PPCToolbox.h> 
  23. #include <Processes.h>
  24. #include <Balloons.h>
  25. #include <aliases.h>
  26. #include <lists.h>
  27. #include <Scrap.h>
  28. #include "common.h"
  29. /* make some typedefs so I have some prototype checking */
  30. typedef void (*myWProcPtr)(WindowPtr theWindow);
  31. typedef void (*myWActiveProcPtr)(WindowPtr theWindow,Boolean activate);
  32.  
  33. /* windowControl is the structure attached to every window I create (in the refCon */
  34. /* field) that contains all the information I need to know about the window. */
  35. /* data, procedure pointers for controlling, and anything else gets put in this */
  36. /* struct.  That makes my windows autonomous */
  37. struct windowControl {
  38.     unsigned long windowID;                                 /* master ID number  */
  39.     myWProcPtr drawMe;                                         /* content drawing procedure pointer */
  40.     myWProcPtr clickMe;                                        /* content click routine */
  41.     myWProcPtr closeMe;                                        /* document close procedure pointer */
  42.     myWProcPtr sizeMe;                                            /* size procedure */
  43.     myWActiveProcPtr activateMe;
  44.     AliasHandle fileAliasHandle;                            /* alias for this document */
  45.     Boolean windowDirty;
  46.     Handle generalData;                                        /* cast to whatever you need as you need it */
  47. };
  48. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  49.  
  50. typedef struct documentExtraData{
  51. ListHandle displayList;
  52. }documentExtraData;
  53. typedef documentExtraData **documentExtraDataHdl;
  54.  
  55.  
  56. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  57. /* menu enums */
  58. enum {kMBarID = 128};
  59. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  60.  
  61. /* file menu enums */
  62. enum {kAboutItem=1,kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  63. enum{kGetResInfoItem = 1};
  64.  
  65. /* general purpose enums */
  66. enum {kResumeMask=1,kHelpString=128,};
  67.  
  68. enum {kMinHeight = 200};
  69.  
  70. enum {kGeneralStrings = 128};
  71. enum {kSayID=1,kSaySize,kSayType,kSayName,kBigAEWords,kBigListWords};
  72.  
  73. #define kWaitForItError 8080
  74.  
  75. /* Dialog resIDs, 200 + */
  76. enum {kSearchDialog = 200,kSampHelp,kResTypeDialog};
  77. enum {kResTypeEditLine=4,kResTypeQuitCheck};
  78.  
  79. /* Alert resIDs 128 + */
  80. enum {kAboutBox=128,kCouldntFindProc=129,kBadSystem=130,kMDeamonError = 131};
  81.  
  82. enum  {
  83.     kEnterKey = 0x03, 
  84.     kTabKey = 9, 
  85.     kReturnKey = 0x0D, 
  86.     kBackSpace = 8, 
  87.     kEscKey = 0x1B, 
  88.     kLeftArrow = 0x1C, 
  89.     kRightArrow, 
  90.     kUpArrow,
  91.     kDownArrow, 
  92.     kDeleteKey = 0x7F
  93. };
  94.  
  95.  
  96. enum {kFrontSleep = 20,kBackSleep = -1,kScrollBarFudge = 16,kTopLineHeight = 25,kWindowBarPad = 120,
  97. kIndentDown = 20,kIndent = 5};
  98.  
  99. typedef pascal Boolean (*extraDialogFilter)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
  100.  
  101. #include "OtherResInfo.protos.h"
  102.  
  103. #endif /* included... */